﻿
using OnlineCourse.Model.Entity;
using System;
using System.Collections.Generic;
using System.Text;
using OnlineCourse.Services.Model;

namespace OnlineCourse.Services.IServices
{
    public interface ICouponsRecordService
    {
        /// <summary>
        /// /添加优惠券查询记录
        /// </summary>
        /// <param name="State"></param>状态
        /// <param name="CouponsId"></param>优惠券ID
        /// <param name="UsersId"></param>用户ID
        /// <param name="Source"></param>来源
        /// <returns></returns>
        bool Add(int num, out int meg, Guid CouponsId, string Source, Guid UserId);
        /// <summary>
        /// 更新状态
        /// </summary>
        bool Update (Guid id, int state);
        /// <summary>
        /// 按照用户id来查询清单
        /// </summary>
        /// <param name="UserId"></param>
        /// <param name="total"></param>
        /// <param name="page"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        IList<CouponsModel> GetUserId(Guid UserId, out int total, int page = 1, int pageSize = 10);
        /// <summary>
        /// 按照券的类型来查询清单
        /// </summary>
        /// <param name="UserId"></param>
        /// <param name="total"></param>
        /// <param name="page"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        IList<CouponsModel> GetCouponId(Guid CouponId, out int total, int page = 1, int pageSize = 10);
        /// <summary>
        /// 按照来源查询清单
        /// </summary>
        /// <param name="Source"></param>
        /// <param name="total"></param>
        /// <param name="page"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        List<CouponsModel> GetSource(String Source, out int total, int page = 1, int pageSize = 10);
        /// <summary>
        /// 按照身份查询清单
        /// </summary>
        /// <param name="State"></param>
        /// <param name="total"></param>
        /// <param name="page"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        IList<CouponsModel> GetState(int State, out int total, int page = 1, int pageSize = 10);
    }
}


